3.1456 \(\int \frac {a^2+2 a b x+b^2 x^2}{d+e x} \, dx\)

Optimal. Leaf size=50 \[ \frac {(b d-a e)^2 \log (d+e x)}{e^3}-\frac {b x (b d-a e)}{e^2}+\frac {(a+b x)^2}{2 e} \]

[Out]

-b*(-a*e+b*d)*x/e^2+1/2*(b*x+a)^2/e+(-a*e+b*d)^2*ln(e*x+d)/e^3

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 50, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {27, 43} \[ -\frac {b x (b d-a e)}{e^2}+\frac {(b d-a e)^2 \log (d+e x)}{e^3}+\frac {(a+b x)^2}{2 e} \]

Antiderivative was successfully verified.

[In]

Int[(a^2 + 2*a*b*x + b^2*x^2)/(d + e*x),x]

[Out]

-((b*(b*d - a*e)*x)/e^2) + (a + b*x)^2/(2*e) + ((b*d - a*e)^2*Log[d + e*x])/e^3

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin {align*} \int \frac {a^2+2 a b x+b^2 x^2}{d+e x} \, dx &=\int \frac {(a+b x)^2}{d+e x} \, dx\\ &=\int \left (-\frac {b (b d-a e)}{e^2}+\frac {b (a+b x)}{e}+\frac {(-b d+a e)^2}{e^2 (d+e x)}\right ) \, dx\\ &=-\frac {b (b d-a e) x}{e^2}+\frac {(a+b x)^2}{2 e}+\frac {(b d-a e)^2 \log (d+e x)}{e^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 43, normalized size = 0.86 \[ \frac {b e x (4 a e-2 b d+b e x)+2 (b d-a e)^2 \log (d+e x)}{2 e^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(a^2 + 2*a*b*x + b^2*x^2)/(d + e*x),x]

[Out]

(b*e*x*(-2*b*d + 4*a*e + b*e*x) + 2*(b*d - a*e)^2*Log[d + e*x])/(2*e^3)

________________________________________________________________________________________

fricas [A]  time = 0.96, size = 62, normalized size = 1.24 \[ \frac {b^{2} e^{2} x^{2} - 2 \, {\left (b^{2} d e - 2 \, a b e^{2}\right )} x + 2 \, {\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}\right )} \log \left (e x + d\right )}{2 \, e^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2*x^2+2*a*b*x+a^2)/(e*x+d),x, algorithm="fricas")

[Out]

1/2*(b^2*e^2*x^2 - 2*(b^2*d*e - 2*a*b*e^2)*x + 2*(b^2*d^2 - 2*a*b*d*e + a^2*e^2)*log(e*x + d))/e^3

________________________________________________________________________________________

giac [A]  time = 0.15, size = 61, normalized size = 1.22 \[ {\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}\right )} e^{\left (-3\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{2} \, {\left (b^{2} x^{2} e - 2 \, b^{2} d x + 4 \, a b x e\right )} e^{\left (-2\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2*x^2+2*a*b*x+a^2)/(e*x+d),x, algorithm="giac")

[Out]

(b^2*d^2 - 2*a*b*d*e + a^2*e^2)*e^(-3)*log(abs(x*e + d)) + 1/2*(b^2*x^2*e - 2*b^2*d*x + 4*a*b*x*e)*e^(-2)

________________________________________________________________________________________

maple [A]  time = 0.05, size = 74, normalized size = 1.48 \[ \frac {b^{2} x^{2}}{2 e}+\frac {a^{2} \ln \left (e x +d \right )}{e}-\frac {2 a b d \ln \left (e x +d \right )}{e^{2}}+\frac {2 a b x}{e}+\frac {b^{2} d^{2} \ln \left (e x +d \right )}{e^{3}}-\frac {b^{2} d x}{e^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b^2*x^2+2*a*b*x+a^2)/(e*x+d),x)

[Out]

1/2*b^2/e*x^2+2*b/e*a*x-b^2/e^2*x*d+1/e*ln(e*x+d)*a^2-2/e^2*ln(e*x+d)*a*b*d+1/e^3*ln(e*x+d)*b^2*d^2

________________________________________________________________________________________

maxima [A]  time = 1.38, size = 60, normalized size = 1.20 \[ \frac {b^{2} e x^{2} - 2 \, {\left (b^{2} d - 2 \, a b e\right )} x}{2 \, e^{2}} + \frac {{\left (b^{2} d^{2} - 2 \, a b d e + a^{2} e^{2}\right )} \log \left (e x + d\right )}{e^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b^2*x^2+2*a*b*x+a^2)/(e*x+d),x, algorithm="maxima")

[Out]

1/2*(b^2*e*x^2 - 2*(b^2*d - 2*a*b*e)*x)/e^2 + (b^2*d^2 - 2*a*b*d*e + a^2*e^2)*log(e*x + d)/e^3

________________________________________________________________________________________

mupad [B]  time = 0.52, size = 62, normalized size = 1.24 \[ \frac {\ln \left (d+e\,x\right )\,\left (a^2\,e^2-2\,a\,b\,d\,e+b^2\,d^2\right )}{e^3}-x\,\left (\frac {b^2\,d}{e^2}-\frac {2\,a\,b}{e}\right )+\frac {b^2\,x^2}{2\,e} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a^2 + b^2*x^2 + 2*a*b*x)/(d + e*x),x)

[Out]

(log(d + e*x)*(a^2*e^2 + b^2*d^2 - 2*a*b*d*e))/e^3 - x*((b^2*d)/e^2 - (2*a*b)/e) + (b^2*x^2)/(2*e)

________________________________________________________________________________________

sympy [A]  time = 0.22, size = 44, normalized size = 0.88 \[ \frac {b^{2} x^{2}}{2 e} + x \left (\frac {2 a b}{e} - \frac {b^{2} d}{e^{2}}\right ) + \frac {\left (a e - b d\right )^{2} \log {\left (d + e x \right )}}{e^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b**2*x**2+2*a*b*x+a**2)/(e*x+d),x)

[Out]

b**2*x**2/(2*e) + x*(2*a*b/e - b**2*d/e**2) + (a*e - b*d)**2*log(d + e*x)/e**3

________________________________________________________________________________________